/*
 * CSSException.h
 *
 *  Created on: 2010-8-28
 *      Author: Xairy
 */

#ifndef CSSEXCEPTION_H_
#define CSSEXCEPTION_H_

#include <exception>
#include <string>
using std::exception;
using std::string;

class CSSException : public exception
{
public:
	enum CodeType
	{
		SAC_UNSPECIFIED_ERR = 0,
		SAC_NOT_SUPPORTED_ERR = 1,
		SAC_SYNTAX_ERR = 2,
	};

public:
	CSSException(CodeType _code = SAC_UNSPECIFIED_ERR, const string* _s = NULL);
	~CSSException()throw();

	const string* getMessage()const;
protected:
	static const string S_SAC_UNSPECIFIED_ERR;
	static const string S_SAC_NOT_SUPPORTED_ERR;
	static const string S_SAC_SYNTAX_ERR;

	string s;
	CodeType code;
};


#endif /* CSSEXCEPTION_H_ */
